#include <stdio.h>
#include <math.h>

int test_array[10] = {1, 2, 43, 34, 5, 6, 7, 8, 9, 10};
int odd[10] = {0};
int even[10] = {0};

int main(int argc, char *argv[])
{
    int o_index = 0;
    int e_index = 0;

    for (int n = 0; n < 10; n++)
    {
        if (test_array[n] % 2)
        {
            odd[o_index++] = test_array[n];
        }
        else
        {
            even[e_index++] = test_array[n];
        }
    }

    for (int i = 0; i < o_index; i++)
    {
        printf("%d ", odd[i]);
    }
    printf("\r\n");

    for (int i = 0; i < e_index; i++)
    {
        printf("%d ", even[i]);
    }
    printf("\r\n");

    return 0;
}
